﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace JXC.Core.Models
{
    /// <summary>
    /// 出库单表
    /// </summary>
    public class OutboundDeliveryOrder
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public Guid Id { get; set; }//单号

        public DateTime SalesDate { get; set; }//销售日期


        [ForeignKey("TheCustomerTableId")]
        public Guid Client { get; set; }//客户


        public string Currency { get; set; }//货币

        public string PaymentMethod { get; set; }//付款方式
        [ForeignKey("UserInfosId")]
        public Guid SalesPerson { get; set; }//销售人

        public int Consigner { get; set; }//发货人

        public string DeliveryAddress  { get; set; }//送货地址

        public string Remark { get; set; }//备注
        [ForeignKey("UserInfosId")]
        public Guid Operator { get; set; }//操作员
        [ForeignKey("UserInfosId")]
        public Guid Auditor { get; set; }//审核人

        public int AuditStatus { get; set; }//审核状态
        [ForeignKey("OrderId")]
        public Guid OrderId { get; set; }//订单号

        public DateTime DateOfEntry { get; set; }//录入日期
        //public Guid DateOfEntry { get; set; }//录入日期

        public DateTime DateOfApproval { get; set; }//审核日期
        //public Guid DateOfApproval { get; set; }//审核日期

        public UserInfos UserInfos { get; set; }
        public Order Order { get; set; }
        public TheCustomerTable TheCustomerTable { get; set; }


    }
}
